#pragma once
#include "DXAMLCommon.h"
#include "CXcpObjectBase.h"
#include "CXcpObjectThreadSafeAddRefPolicy.h"
#include "IObject.h"

class CCompositorDirectManipulationViewport :
	public CXcpObjectBase<IObject,CXcpObjectThreadSafeAddRefPolicy>
{

public: 
	static HRESULT Create(CCompositorDirectManipulationViewport * * ppCDMViewport, struct IObject * pViewport, struct IObject * pPrimaryContent, struct IPALDirectManipulationCompositorService * pDirectManipulationCompositorService, XBOOL fIsZoomFactorStatic);
	struct IObject * GetCompositorViewportNoRef();
	struct IObject * GetCompositorPrimaryContentNoRef();
	struct IPALDirectManipulationCompositorService * GetDMCompositorServiceNoRef();
	XBOOL IsZoomFactorStatic();
	HRESULT UpdateTransform();
	void SetTransform(XFLOAT translationX, XFLOAT translationY, XFLOAT zoomFactor);
	void ResetTransform();
	XBOOL IsThisTransformSet(XFLOAT translationX, XFLOAT translationY, XFLOAT zoomFactor);

private: 
	CCompositorDirectManipulationViewport(struct IObject * pViewport, struct IObject * pPrimaryContent, struct IPALDirectManipulationCompositorService * pDirectManipulationCompositorService, XBOOL fIsZoomFactorStatic);
	virtual ~CCompositorDirectManipulationViewport();
	struct IObject * m_pViewport;
	struct IObject * m_pPrimaryContent;
	struct IPALDirectManipulationCompositorService * m_pDirectManipulationCompositorService;
	XBOOL m_fIsZoomFactorStatic;
	XBOOL m_fIsTransformSet;
	XFLOAT m_translationX;
	XFLOAT m_translationY;
	XFLOAT m_zoomFactor;


};
